<template>
	<!-- 20221102 -->
	<view class="function-h5-alipay-cn">
		<!-- 页面内容 -->
		<view class="cn-content">
			<view v-html="rawHtml"></view>
			<!-- rawHtml示例：
			'<form id=\'alipaysubmit\' name=\'alipaysubmit\' action=\'https://openapi.alipay.com/gateway.do?charset=UTF-8\' method=\'POST\'>
				<input type=\'hidden\' name=\'method\' value=\'alipay.trade.wap.pay\'/>
				<input type=\'hidden\' name=\'app_id\' value=\'2021003126678281\'/>
				<input type=\'hidden\' name=\'timestamp\' value=\'2022-11-02 14:35:51\'/>
				<input type=\'hidden\' name=\'format\' value=\'json\'/>
				<input type=\'hidden\' name=\'version\' value=\'1.0\'/>
				<input type=\'hidden\' name=\'alipay_sdk\' value=\'alipay-easysdk-php-2.2.0\'/>
				<input type=\'hidden\' name=\'charset\' value=\'UTF-8\'/>
				<input type=\'hidden\' name=\'sign_type\' value=\'RSA2\'/>
				<input type=\'hidden\' name=\'app_cert_sn\' value=\'4f7973522460e8adce35736cdd1c1b01\'/>
				<input type=\'hidden\' name=\'alipay_root_cert_sn\' value=\'687b59193f3f462dd5336e5abf83c5d8_02941eef3187dddf3d3b83462e1dfcf6\'/>
				<input type=\'hidden\' name=\'biz_content\' value=\'{"subject":"商城支付订单","out_trade_no":"M202211021435516323","total_amount":0.01,"quit_url":"https:\\/\\/tp.jucheng01.net\\/h5\\/#\\/pages\\/mall\\/my\\/orderList","product_code":"QUICK_WAP_WAY"}\'/>
				<input type=\'hidden\' name=\'return_url\' value=\'https://tp.jucheng01.net/h5/#/pages/mall/my/orderList\'/>
				<input type=\'hidden\' name=\'notify_url\' value=\'https://tp.jucheng01.net/index.php/mall/api/Callback/alipayNotify/agent/h5/uid/2\'/>
				<input type=\'hidden\' name=\'sign\' value=\'QljKBQiHgwvsz14ipP4uzBoCv4uXkO2GfVRnA2Hrjc4j4pLQVefALBl0KY0PjFE5ztb9bljZ+XFBTMsChs6VcQekFFYc0djrAuwGXzOqMZ+nWiaLVhe/LUIZUVkUVr+cut0EGj8PpqxpqLyOt0GX1CuxkbR8LkoXWgjeGuvxFxYy99SrMltyn8PC5xHTUEzDpTAwnpWwucg+1St54gcoqsjLe2ZmFDaUf9Cvz9G8mLboBK9zpTH2ZmIhqoRzpJ0vFbGM/nD6R/xv0prO7ENwM0b1lhzAMeBzWasgpzlBcDM58RWhKqgDAkNdayD3sDZTjlmIQyb7oZv8p8IxOGRwsQ==\'/>
				<input type=\'submit\' value=\'ok\' style=\'display:none;\'\'>
			</form>
			<script>
				document.forms[\'alipaysubmit\'].submit();
			</script>' -->
		</view>
		<!-- 页面浮层 -->
		<view class="cn-layer">
			
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			// H5支付宝支付表单
			rawHtml: {
				type: String,
				default: ''
			}
		},

		watch: {
			rawHtml(newVal) {
				if (newVal) {
					this.$nextTick(() => {
						document.forms['alipaysubmit'].submit()
					})
				}
			}
		}
	}
</script>

<style>
</style>
